import javax.swing.JComponent;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;

public class ThreeDButtonComponent extends JComponent
{
   public void paintComponent(Graphics g)
   {
      Graphics2D g2 = (Graphics2D) g;
      g2.setColor(Color.pink.darker());
      g2.fillRect(48,48,104,104);
      g2.setColor(Color.pink.brighter());
      g2.fillRect(48,48,102,102);
      g2.setColor(Color.pink);
      g2.fillRect(50,50,100,100);
   }
}